$$.data.Proxy = function(){
	
}

/**
 * @class $$.data.FileProxy
 */
$$.data.FileProxy = function(){}
Object.extend($$.data.Proxy, $$.data.FileProxy);

/**
 * @class $$.data.SqlProxy
 * 提供数据库连接、各个DAO的方案。
 */
$$.data.SqlProxy = function(){
	
}
;(function(){
	
	$$.data.SqlProxy.prototype = {
		 connStr	: null
		,execCMD : function(connObj, rsObj, sql){
		    return {
		         connObj: connObj
		        ,rsObj  : rsObj
		        ,sql    : sql
		    };
		}
	};
})();
$$.data.SqlProxy.connObj = null;

Object.extend($$.data.Proxy, $$.data.SqlProxy);

/**
 * @class $$.data.Asp_Access_Proxy
 */
$$.data.Asp_Access_Proxy = function(){
	
}
;(function(){
	// static member
	var 
		 connStr    = "DBQ={0};DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
		,SqlProxy	= $$.data.SqlProxy
		,connObj	= SqlProxy.connObj
		,connect	= function(DB_path){
		    var 
		         local_DB   = $$.cfg.edk_dbFilePath
		        ,test_DB	= $$.cfg.edk_dbFilePath_Test
		        ,DB_path	= $$.cfg.edk_isDebugging ? test_DB : Server.mappath(local_DB);
		    	
		    	// 若此次加了var就大不同！
		    	connObj	= connObj || (function(connObj){
	            	connObj.open(connStr.format(DB_path));
		            SqlProxy.connObj = connObj; // set Static connObj
	            	return connObj;
		    	})(new ActiveXObject("ADODB.CONNECTION"));
            
            return connObj;
		};

	$$.data.Asp_Access_Proxy.prototype = {
		 setConnStr : function(connStr){
			connStr = connStr;
		}
		,execCMD : function(sql){
			var connObj = connect();
			return this._execCMD(connObj, connObj.execute(sql), sql);
		}
		,connect: connect
	};
	
	$$.data.Asp_Access_Proxy.connect = connect;
})();
Object.extend($$.data.Proxy, $$.data.Asp_Access_Proxy);

/**
 * @class $$.data.NoSqlProxy
 */
$$.data.NoSqlProxy = function(){}
Object.extend($$.data.Proxy, $$.data.NoSqlProxy);

/**
 * @class $$.data.WebServicelProxy
 */
$$.data.WebServicelProxy = function(){}
Object.extend($$.data.Proxy, $$.data.WebServicelProxy);